How do I create a Calculated Field?
Description
Calculated fields in a Form Design are defined using TPL.
To create a calculated field, you must add TPL to the ON *CHANGED event for the field(s) to compute the new value and save it in the field.
Open the TPL Editor for the form that contains the calculated field. Go to Advanced Features > Edit Custom Code.
Select the Yes radio button above the Edit Custom Code link to enable the TPL editor.
Next, click the Changed button for the field that is used to compute the value.
Enter TPL in the ON *CHANGED function to compute the value and set it in the field:
ON *changed_length #area = #length * #width ENDON
Field names are case sensitive!Click Save to save your calculation.
If the calculated field is computed from multiple controls, repeat the above steps for each field.
After you have added the TPL to the ON *CHANGED field(s) to update the calculated field, click Save on the left-hand side of the screen to save your changes. Then, click Click to save changes to upload your changes to the TransForm Cloud.
Finally, test your form in the TransForm Filler mobile application.
See Also